package com.yeskery.nut.web.demo.service.impl;

import com.yeskery.nut.annotation.bean.Service;
import com.yeskery.nut.extend.mybatisplus.ServiceImpl;
import com.yeskery.nut.web.demo.domain.Product;
import com.yeskery.nut.web.demo.mapper.ProductMapper;
import com.yeskery.nut.web.demo.service.ProductService;

/**
 * 商品service实现类
 * @author Yeskery
 * 2023/7/28
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {
    @Override
    public boolean deductStock(Integer productId, Integer num) {
        return getBaseMapper().deductStock(productId, num) > 0;
    }
}
